Fluid animate is one of a class of algorithms for calculating fluid flow. This sample uses the serial implementation to demonstrate the use of Intel Profile Guided Optimization (PGO) without any code change.The PGO of Intel® C++ Compiler improves application performance by reorganizing code layout to reduce instruction-cache problems and branch mispredictions. With the collected application runtime information Intel C++ Compiler is able to be more selective and specific in optimizing the application. This may also help with application size introduced by aggressive inlining. You can find more in-depth explanation in this article Guide to Profile-guided Optimization of Computational Fluid Dynamics with Intel® Compiler.

System Requirements:

Performance Gain with PGO

PGO Speedup vs non PGO Compiler (Intel® 64) Compiler options System specifications
Scalar 14%

AN 7%

Intel® Parallel Studio XE 2019 Composer Edition for C++ Windows* /O2 /Qipo /fp:fast /Oi /MD /EHsc /Qprof-dir "Intel-Release\" Windows 7 Enterprise SP1
4th Gen Intel® Core™ i5-4300U CPU @ 1.90GHz + 4GB memory
Scalar 4%

AN 4%

Intel® Parallel Studio XE 2019 Composer Edition for C++ macOS* -O2 -ipo -fast -prof-dir ./intel-release OS X* 10.11.3
3nd Gen Intel® Core™ i7-2635QM CPU @ 2GHZ + 8GB memory
Scalar 5%

AN 9%

Intel® Parallel Studio XE 2019 Composer Edition for C++ Linux* -O2 -ipo -fast -prof-dir ./intel-release Red Hat Enterprise Linux Server release 7.1
 5th Gen Intel® Core™ i7-5850HQ CPU @ 2.70GHz + 16GB memory

Build Instructions

For Microsoft* Visual Studio* users:
For Windows Command Line users:
For Linux* or macOS* users: